package controller

import (
	"context"
	"xr-game-server/core/httpserver"
	"xr-game-server/dto/noticedto"
	"xr-game-server/module/notice"
)

type Notice struct {
}

func initNotice() {
	httpserver.RegCMSCustomizeRes("/notice", &Notice{})
}
func (receiver *Notice) GetAllNotice(ctx context.Context, req *noticedto.GetNoticeReq) (res *httpserver.CMSQueryResp, err error) {
	return notice.Page(ctx, req)
}
func (receiver *Notice) AddNotice(ctx context.Context, req *noticedto.AddNoticeReq) (res bool, err error) {
	return notice.AddNotice(ctx, req)
}

func (receiver *Notice) AddOnceNotice(ctx context.Context, req *noticedto.AddOnceNoticeReq) (res bool, err error) {
	return notice.AddOnceNotice(ctx, req)
}
func (receiver *Notice) PushNotice(ctx context.Context, req *noticedto.PushNoticeReq) (res *noticedto.PushNotice, err error) {
	return nil, nil
}
